//
//  ReportViewController.m
//  OpenYourEyes
//
//  Created by 沈振烨 on 15/8/19.
//  Copyright (c) 2015年 zhanglei. All rights reserved.
//

#import "ReportViewController.h"
#import "Header.h"

@interface ReportViewController ()

@property (nonatomic ,strong) UIScrollView *scrollView;

@property (nonatomic ,strong) UILabel *labelTitle;

@property (nonatomic ,strong) UILabel *labelFristTitle;

@property (nonatomic ,strong) UILabel *labelSecondTitle;

@property (nonatomic ,strong) UILabel *labelFrist;

@property (nonatomic ,strong) UILabel *labelSecond;

@property (nonatomic ,strong) UILabel *labelThree;

@end

@implementation ReportViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"版权举报";
    self.view.backgroundColor = [UIColor whiteColor];
    [self userNegotiate];

}

- (void)userNegotiate
{
    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    _scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT + 50);
    [self.view addSubview:_scrollView];
    
    _labelTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, SCREEN_WIDTH, 30)];
    _labelTitle.text = @"“SEEWORLD”软件权利声明";
    _labelTitle.font = [UIFont fontWithName:@"Arial-BoldMT" size:20];
    _labelTitle.textAlignment = NSTextAlignmentCenter;
    
    _labelFristTitle = [[UILabel alloc] initWithFrame:CGRectMake(_labelTitle.left + 30, _labelTitle.bottom + 20, _labelTitle.width, _labelTitle.height)];
    _labelFristTitle.text = @"一、视频知识产权";
    _labelFristTitle.font = [UIFont fontWithName:@"ArialHebrew" size:17];
    
    [_scrollView addSubview:_labelFristTitle];
    [_scrollView addSubview:_labelTitle];
    
    _labelFrist = [[UILabel alloc] initWithFrame:CGRectMake(_labelFristTitle.left, _labelFristTitle.bottom + 15, _labelFristTitle.width - 60, 30)];
    _labelFrist.text = @"1、使用该软件，请勿使用不正当手段使用他人视频作品，也不能诋毁、破坏作品技术。";
    _labelFrist.font = [UIFont systemFontOfSize:14];
    _labelFrist.numberOfLines = 0;
    _labelFrist.textColor = [UIColor grayColor];
    _labelFrist.alpha = 0.9;
    
    [_scrollView addSubview:_labelFrist];
    
    _labelFrist.frame = CGRectMake(_labelFristTitle.left, _labelFristTitle.bottom + 15, _labelFristTitle.width - 60, [self heightWithString:_labelFrist]);
    
    
    
    _labelSecond = [[UILabel alloc] initWithFrame:CGRectMake(_labelFristTitle.left, _labelFrist.bottom + 15, _labelFristTitle.width - 60, 30)];
    _labelSecond.text = @"2、本软件所提供的视频内容均来自于第三方网站，我们对其中任何内容的合法性、准确性、完整性、和可靠性概不负责，亦不承担任何法律责任，亦不对该链接到的内容作出任何明示或默示的保证，包括但不限于有关所有权、质量、没有侵犯第三方权利、没有病毒保证。";
    _labelSecond.font = [UIFont systemFontOfSize:14];
    _labelSecond.numberOfLines = 0;
    _labelSecond.textColor = [UIColor grayColor];
    _labelSecond.alpha = 0.9;
    
    [_scrollView addSubview:_labelSecond];
    
    _labelSecond.frame = CGRectMake(_labelFrist.left, _labelFrist.bottom + 15, _labelFristTitle.width - 60, [self heightWithString:_labelSecond]);
    
    
    _labelSecondTitle = [[UILabel alloc] initWithFrame:CGRectMake(_labelTitle.left + 30, _labelSecond.bottom + 20, _labelTitle.width, _labelTitle.height)];
    _labelSecondTitle.text = @"二、视频版本声明";
    _labelSecondTitle.font = [UIFont fontWithName:@"ArialHebrew" size:17];
    
    [_scrollView addSubview:_labelSecondTitle];
    
    
    
    _labelThree = [[UILabel alloc] initWithFrame:CGRectMake(_labelFristTitle.left, _labelSecondTitle.bottom + 15, _labelFristTitle.width - 60, 30)];
    _labelThree.text = @"1、我们将以最大努力维护该软件正常运行，但您应对使用该软件的结果自行承担风险，也对此不做任何承诺或保证，不保证服务不中断，不保证您所浏览的视频内容的安全性、准确性、完整性、合法性及可靠性，不保证第三方网站是否对其所提供的视频作品均拥有合法、有效。完整的知识产权，对您的数据损失。丢失或服务停止不承担任何责任。";
    _labelThree.font = [UIFont systemFontOfSize:14];
    _labelThree.numberOfLines = 0;
    _labelThree.textColor = [UIColor grayColor];
    _labelThree.alpha = 0.9;
    
    [_scrollView addSubview:_labelThree];
    
    _labelThree.frame = CGRectMake(_labelFrist.left, _labelSecondTitle.bottom + 15, _labelFristTitle.width - 60, [self heightWithString:_labelThree]);
    
}
- (CGFloat)heightWithString:(UILabel *)label
{
    
    CGSize size = [label.text boundingRectWithSize:CGSizeMake(label.frame.size.width, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size;
    return size.height;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
